using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class ActionType
    {

        private string _BookmarkLink;
        private DrillthroughType _Drillthrough;
        private string _Hyperlink;
        private string _Label;

        public string BookmarkLink
        {
            get
            {
                return _BookmarkLink;
            }
            set
            {
                _BookmarkLink = value;
            }
        }

        public DrillthroughType Drillthrough
        {
            get
            {
                if (_Drillthrough == null)
                    _Drillthrough = new DrillthroughType();
                return _Drillthrough;
            }
            set
            {
                _Drillthrough = value;
            }
        }

        public string Hyperlink
        {
            get
            {
                return _Hyperlink;
            }
            set
            {
                _Hyperlink = value;
            }
        }

        public string Label
        {
            get
            {
                return _Label;
            }
            set
            {
                _Label = value;
            }
        }

        public ActionType()
        {
        }

        public ActionType Write()
        {
            ActionType actionType = new ActionType();
            ArrayList arrayList1 = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            if (_BookmarkLink != null)
            {
                arrayList1.Add(_BookmarkLink);
                arrayList2.Add(1);
            }
            if (_Drillthrough != null)
            {
                arrayList1.Add(_Drillthrough.Write());
                arrayList2.Add(2);
            }
            if (_Hyperlink != null)
            {
                arrayList1.Add(_Hyperlink);
                arrayList2.Add(3);
            }
            if (_Label != null)
            {
                arrayList1.Add(_Label);
                arrayList2.Add(4);
            }
            actionType.Items = arrayList1.ToArray();
            actionType.ItemsElementName = (ItemsChoiceType8[])arrayList2.ToArray(typeof(ItemsChoiceType8));
            arrayList2 = arrayList1 = null;
            return actionType;
        }

    } // class ActionType

}

